<%@ page contentType="text/html; charset=UTF-8" %>
<%
    response.setHeader("Cache-Control", "no-store");
    response.setHeader("Pragrma", "no-cache");
    response.setDateHeader("Expires", 0);
    Long resid = Long.parseLong(request.getParameter("id"));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>linux综合性能页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta name="Keywords" content=" " />
<meta name="Description" content=" " />
<%@ include file="../include/common.jsp"%>


<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/style/default/bsm/sub_menu.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/style/default/bsm/perf/listPage.css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/resources/charts/FusionCharts.js"></script>
	
<script type="text/javascript"
	src="${pageContext.request.contextPath}/resources/charts/FusionCharts.jqueryplugin.js"></script>
	
<script type="text/javascript">

	var tcpChart;
	function initTCP() {
		if(typeof tcpChart == undefined || tcpChart == null){
			tcpChart =  new FusionCharts( "${pageContext.request.contextPath}/resources/charts/MSSpline.swf?ChartNoDataText=没有数据","tcpChart1", "100%", "100%", "0", "1" );
		}
		 
		//连接数曲线
		$.ajax({
			url : 'real-time!get2LineChart.action', // 
			type : 'POST',
			dataType : "json",
			data : {
				resId :<%=resid %>,
				childType:'1203060100000',
				propIds:'120306010000007,120306010000008'
			},
			success : function(data) {
				tcpChart.setJSONData(data);
				tcpChart.render("threadChart");
			}
		});
	}

    

	var uptimeColChart;
	var fsColChartc;
	function initBaseInfo(){
			//基本信息
			$.ajax({
				url : 'real-time!getBaseInfo.action', // 
				type : 'POST',
				dataType : "json",
				data : {
					resId :<%=resid %>,
					propIds:'prop_110306000000001,prop_110306000000002'
				},
				success : function(data) {
					$('#prop_110306000000001').text(data.prop_110306000000001); 
					$('#prop_110306000000002').text(data.prop_110306000000002); 
					$('#resIp').text(data.ip);
				}
			});
			
			//基本信息
			$.ajax({
				url : 'real-time!getBaseInfo.action', // 
				type : 'POST',
				dataType : "json",
				data : {
					resId :<%=resid %>,
					childType:'1203060100000',
					propIds:'prop_120306010000001,prop_120306010000002,prop_120306010000003'
				},
				success : function(data) {
					$('#prop_120306010000001').text(data.prop_120306010000001); 
					$('#prop_120306010000002').text(data.prop_120306010000002); 
					$('#prop_120306010000003').text(data.prop_120306010000003); 
				}
			});
	}
	
	$(document).ready(function() {
			initBaseInfo();
			initTCP();
		//CPU 内存 每10S刷新一次
		setInterval('initBaseInfo()',60000);
	});
</script>

</head>
<body>

	<div class="column">
		<div class="col-main">
			<!--基本信息-->
			<div class="col-l-extra h-400">
			<h2 class="title-h2 m-0">基本信息</h2>
			<ul class="col-l-ul">
					<li><span class="col-l-ul-l" >中间件类别:</span><span 
								class="col-l-ul-r"><img src="${pageContext.request.contextPath}/style/default/bsm/perf/images/apache24_24.png"></span>
					</li>
					<li><span class="col-l-ul-l" class="baseinfo">IP:</span><span id="resIp"
						class="col-l-ul-r"></span>
					</li>
					<li><span class="col-l-ul-l" class="baseinfo">版本:</span><span id="prop_110306000000001"
						class="col-l-ul-r"></span>
					</li>
					<li><span class="col-l-ul-l" class="baseinfo">运行时间:</span><span id="prop_110306000000002"
						class="col-l-ul-r"></span>
					</li>
					<li><span class="col-l-ul-l" class="baseinfo">总访问次数:</span><span id="prop_120306010000001"
						class="col-l-ul-r"></span>
					</li>
					<li><span class="col-l-ul-l" class="baseinfo">总访问数量:</span><span id="prop_120306010000002"
						class="col-l-ul-r"></span>
					</li>
					<li><span class="col-l-ul-l" class="baseinfo">启动时间:</span><span id="prop_120306010000003"
						class="col-l-ul-r"></span>
					</li>
			</ul>
			</div>
			<!--@end基本信息-->
			<div class="col-r-main">
				<div class="col-v-rate-extra f-r h-400" style="width:100%;">
				   <h2 class="title-h2 m-0">工作者数量 [当天趋势图]-[忙工作者数量,闲工作者数量]</h2>
				   <div id="threadChart"></div>
			    </div>
		 </div>   
	  </div>
	</div>
    <div class="column" style="width:100%;height:5px;"></div>
</body>